package W1109;

public class Student {
	String name;
	int age;

	public String toString() {
		return  name;
	}

	public Student(String name, int age) {
		this.name = name;
		this.age = age;
	}

	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj instanceof Student) {
			Student stu = (Student) obj;
			if (this.name.equals(stu.name) && this.age == stu.age) {
				return true;
			}
		}
		return false;
	}

}
